<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class MyController extends Controller
{
    //
    public function input($name)
    {
        return 'name的值为' . $name;
    }
    public function show()
    {
        return view('show');
    }
    // 表单处理
    public function form()
    {
        return view('form');
    }
    public function tiansfer()
    {
        return '转账成功！成功付款1000元';
    }
    // 显示表单
    public function profile()
    {
        dump(session()->all());
        return view('profile');
    }
    public function store(Request $request)
    {
        //验证规则
        $validatedDate =$request->validate([
            'name'=>'required|string|bail|max:255',
            'email'=> 'required|email',
            'age' => 'required|integer',
            'hobby'=>'required'
        ]);
    }
}
